package com.rd.student.jiaji.class3.sunguowei.day28;

//调料类
public class Decorator extends Drink{

    private Drink drink;

    public Decorator(Drink drink){
        this.drink=drink;
    }
    @Override
    public double cost() {
        return super.getPrice()+drink.getPrice();
    }

    @Override
    public String getDesc(){
        return drink.getDesc()+" "+super.getDesc();
    }
}
